import {
  NAutoComplete,
  NCascader,
  NCheckbox,
  NDatePicker,
  // NIconPicker,
  NInput,
  // NInputCountDown,
  NInputGroup,
  NInputNumber,
  // NRangePicker,
  NRate,
  NSlider,
  // NStrengthMeter,
  NSwitch,
  NTimePicker,
  NUpload,
  // NWeekPicker,
} from 'naive-ui';

import IconSelect from '@/components/form/src/components/icon-select/index.vue';
import Select from '@/components/form/src/components/select/index.vue';
import TreeSelect from '@/components/form/src/components/tree-select/index.vue';
import CheckboxGroup from '@/components/form/src/components/checkbox-group/index.vue';
import RadioGroup from '@/components/form/src/components/radio-group/index.vue';
import RichTextEditor from '@/components/form/src/components/rich-text-editor/index.vue';
import FormFieldType from '@/components/form/src/types/field-type';

export const formFieldComponentMap = {
  [FormFieldType.INPUT]: NInput,
  [FormFieldType.INPUT_GROUP]: NInputGroup,
  [FormFieldType.INPUT_NUMBER]: NInputNumber,
  [FormFieldType.SELECT]: Select,
  [FormFieldType.TREE_SELECT]: TreeSelect,
  [FormFieldType.RADIO_GROUP]: RadioGroup,
  [FormFieldType.CHECKBOX]: NCheckbox,
  [FormFieldType.CHECKBOX_GROUP]: CheckboxGroup,
  [FormFieldType.AUTO_COMPLETE]: NAutoComplete,
  [FormFieldType.CASCADER]: NCascader,
  [FormFieldType.DATE_PICKER]: NDatePicker,
  [FormFieldType.TIME_PICKER]: NTimePicker,
  [FormFieldType.SWITCH]: NSwitch,
  [FormFieldType.UPLOAD]: NUpload,
  [FormFieldType.SLIDER]: NSlider,
  [FormFieldType.RATE]: NRate,
  [FormFieldType.ICON]: IconSelect,
  [FormFieldType.RICH_TEXT_EDITOR]: RichTextEditor,
};
